<?php
$semName = $_POST['SemName'];
$startDate = $_POST['startDate'];
$endDate = $_POST['endDate'];
$acYr = $_POST['acYr'];
$desc = $_POST['Desc'];
include 'dbconnection.php';
$query = " INSERT INTO semester ( sem_name , s_date , e_date , sem_desc , acedamic_year_ayear_id) VALUES ('$semName', '$startDate' , '$endDate' , '$desc' ,'2' )";
if (!$result = mysql_query($query)) {
    die("<div id='inner_main'><div class='alert alert-error'>
    <button type='button' class='close' data-dismiss='alert'>&times;
    </button>
    <h4>Insert Error!</h4>
    Could not execute query<br/>" . mysql_error() . "
    </div></div >");
}
include 'dbconnectionclose.php';
?>
<div id='inner_main'><div class='alert alert-success'>
        <button type='button' class='close' data-dismiss='alert'>&times;
        </button>
        <h4>Successful!</h4>
        Transaction Completed Successfully.
    </div></div >